import {http} from '@/libs/httpRequest';
import config from '../config'

//获取菜单数据
export function getMenuList (params) {
  return http({
    url: '/static/json/menu.json',
    method: 'get',
    params: params

  })
}

//通过枚举名称获取数据
export function getEnum (params) {
  return http({
    url: config.getEnumUrl,
    method: 'get',
    params: params
  })
}

//通过字典名称获取数据
export function getDict (params) {
  return http({
    url: config.getDictUrl,
    method: 'get',
    params: params
  })
}

//通过url获取数据
export function getDataByUrl (url, params) {
  return http({
    url: url,
    method: 'get',
    params: params
  })
}
//获取表格数据
export function getTable (params) {
  return http({
    url: '/static/json/table.json',
    method: 'get',
    params: params
  })
}


//生成代码
export function genCode ( data) {
  return http({
    url: "/admin/common/code",
    method: 'post',
    data: data,
    responseType:'blob'
  })
}


